package org.example.business.controller;

import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
import org.example.Result;
import org.example.business.TbBusiness;
import org.example.business.service.ITbBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 商机表 前端控制器
 * </p>
 *
 * @author baomidou
 * @since 2023-07-05
 */
@RestController
@RequestMapping("/business/tbBusiness")
@CrossOrigin(origins = "http://localhost:63342")
public class TbBusinessController {
    @Autowired
    ITbBusinessService service;
    @GetMapping
    public Result<List<TbBusiness>> getAll(){
        return Result.ok(service.list());
    }
}
